Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEAT]: Add trustchain & createQRCodeHostInstance flow #7520

Merged
merged 1 commit into from
Aug 7, 2024

Conversation

mcayuelas-ledger
Copy link
Contributor

βœ… Checklist

  • npx changeset was attached.
  • Covered by automatic tests.
  • Impact of the changes:
    • Trustchain integrated for adding member with displaying QRCode

πŸ“ Description

  • Add trustchain & createQRCodeHostInstance flow

❓ Context

  • JIRA or GitHub link:

🧐 Checklist for the PR Reviewers

  • The code aligns with the requirements described in the linked JIRA or GitHub issue.
  • The PR description clearly documents the changes made and explains any technical trade-offs or design decisions.
  • There are no undocumented trade-offs, technical debt, or maintainability issues.
  • The PR has been tested thoroughly, and any potential edge cases have been considered and handled.
  • Any new dependencies have been justified and documented.
  • Performance considerations have been taken into account. (changes have been profiled or benchmarked if necessary)

@mcayuelas-ledger mcayuelas-ledger requested a review from a team as a code owner August 6, 2024 08:46
Copy link

vercel bot commented Aug 6, 2024

The latest updates on your projects. Learn more about Vercel for Git β†—οΈŽ

5 Skipped Deployments
Name Status Preview Comments Updated (UTC)
ledger-live-docs ⬜️ Ignored (Inspect) Visit Preview Aug 7, 2024 9:59am
ledger-live-github-bot ⬜️ Ignored (Inspect) Visit Preview Aug 7, 2024 9:59am
native-ui-storybook ⬜️ Ignored (Inspect) Visit Preview Aug 7, 2024 9:59am
react-ui-storybook ⬜️ Ignored (Inspect) Visit Preview Aug 7, 2024 9:59am
web-tools ⬜️ Ignored (Inspect) Visit Preview Aug 7, 2024 9:59am

@live-github-bot live-github-bot bot added the desktop Has changes in LLD label Aug 6, 2024
@live-github-bot
Copy link
Contributor

live-github-bot bot commented Aug 6, 2024

Mobile Bundle Checks

Comparing e1bdf18 against 3de93cc.

βœ… Previous issues have all been fixed.

Desktop Bundle Checks

Comparing e1bdf18 against 3de93cc.

LucasWerey
LucasWerey previously approved these changes Aug 6, 2024
},
onDisplayDigits: digits => {
dispatch(setQrCodePinCode(digits));
dispatch(setFlow({ flow: Flow.Synchronize, step: Step.PinCode }));
},
addMember: async member => {
await sdk.addMember(trustchain, memberCredentials, member);
hasCompleted = true;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you should prefer to do this after createQRCodeHostInstance 's Promise terminates.

NB: it can also fails, so maybe you can .then( successHandling, errorHandling ) on it (depending if you need to handle the error or not, for instance the websocket can be closed due to network cut )

Copy link
Contributor

@gre gre Aug 6, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, i actually misunderstood the code.

I see that you use the hasCompleted in a laterthen, is it because the catch sometimes recover from an error? in that case maybe the then() should be moved before?

actually you have guarantee that if promise succeed, it means the whole process was successful πŸ€”

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can try opening the QRCode screen on LLD, for example, and do nothing. After a while, you'll see the success screen appear, which means you're in the then

Base automatically changed from feat/LIVE-12167 to develop August 7, 2024 09:20
@LucasWerey LucasWerey dismissed their stale review August 7, 2024 09:20

The base branch was changed.

@mcayuelas-ledger mcayuelas-ledger force-pushed the feat/truschain-qrCode branch 4 times, most recently from 1a0e61b to d1686a7 Compare August 7, 2024 09:53
[FIX]: issue when staying long time on DisplayQRcode page

Rework Hook
@mcayuelas-ledger mcayuelas-ledger merged commit 641cc17 into develop Aug 7, 2024
47 of 48 checks passed
@mcayuelas-ledger mcayuelas-ledger deleted the feat/truschain-qrCode branch August 7, 2024 12:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
desktop Has changes in LLD mobile Has changes in LLM
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants